import { configureStore } from "@reduxjs/toolkit";
import { TypedUseSelectorHook, useDispatch, useSelector } from "react-redux";
import recommendReducer from "@/views/Discover/c-views/Recommend/store/recommend";
const store = configureStore({
    reducer: {
        recommend:recommendReducer
    }
})

type GetStateFnType = typeof store.getState
type IRootState = ReturnType<GetStateFnType>
type DispatchType =typeof store.dispatch

export const useAppSelector:TypedUseSelectorHook<IRootState>=useSelector
export const useAppDispatch:()=>DispatchType=useDispatch

export default store